import time
a=open('/home/student/Рабочий стол/Ксения Стаценко/m1_sorted.txt')
b=a.readlines
b=list(map(int,a))
st=time.time()
for i in range (len(b)-1):
 for j in range (i+1, len(b)):
    if b[i] > b[j]:
        b[i], b[j]=b[j], b[i]
fin=time.time()
print(round(fin-st)*1000)

r=open('/home/student/Рабочий стол/Ксения Стаценко/m2_reverse.txt')
t=r.readlines
t=list(map(int,a))
st=time.time()
for i in range (len(t)-1):
    for j in range (i+1, len(t)):
        if t[i] > t[j]:
            t[i], t[j]=t[j], t[i]
fin=time.time()
print(round(fin-st)*1000)

w=open('/home/student/Рабочий стол/Ксения Стаценко/m3_shuffle.txt')
q=w.readlines
q=list(map(int,a))
st=time.time()
for i in range (len(q)-1):
    for j in range (i+1, len(q)):
        if q[i] > q[j]:
            q[i], q[j]=q[j], q[i]
fin=time.time()
print(round(fin-st)*1000)
